<route lang="json5">
{
  style: {
    navigationBarTitleText: '人员评分详情',
  },
}
</route>

<template>
  <view class="common-detail-info-body">
    <view class="detail-info-title">
      <view class="detail-info-title__line"></view>
      <text>{{ detail.userId_dictText }}</text>
    </view>
    <view class="detail-info-others">
      <view class="others-line"></view>
      <view class="others-item">
        <view class="others-item__label">
          <view class="others-item__label-icon">
            <wd-icon name="time" size="28rpx"></wd-icon>
          </view>
          <view class="others-item__label-text">年度</view>
        </view>
        <view class="others-item__value">{{ detail?.year }}</view>
      </view>
      <view class="others-item">
        <view class="others-item__label">
          <view class="others-item__label-icon">
            <wd-icon name="time" size="28rpx"></wd-icon>
          </view>
          <view class="others-item__label-text">季度</view>
        </view>
        <view class="others-item__value">{{ detail?.quarter }}</view>
      </view>
      <view class="others-item">
        <view class="others-item__label">
          <view class="others-item__label-icon">
            <wd-icon name="list" size="28rpx"></wd-icon>
          </view>
          <view class="others-item__label-text">目标活动数量</view>
        </view>
        <view class="others-item__value">{{ detail?.targetNum }}</view>
      </view>
      <view class="others-item">
        <view class="others-item__label">
          <view class="others-item__label-icon">
            <wd-icon name="view-module" size="28rpx"></wd-icon>
          </view>
          <view class="others-item__label-text">实际活动数量</view>
        </view>
        <view class="others-item__value">{{ detail?.actualNum }}</view>
      </view>
    </view>
  </view>
  <!-- <view class="common-container">
    <wd-form custom-class="common-form" ref="formRef" :model="formModel">
      <wd-cell-group>
        <wd-input
          readonly
          label="用户"
          label-width="110px"
          v-model="formModel.userId_dictText"
          placeholder=""
        />
        <wd-input
          readonly
          label="年度"
          label-width="110px"
          v-model="formModel.year"
          placeholder=""
        />
        <wd-input
          readonly
          label="季度"
          label-width="110px"
          v-model="formModel.quarter"
          placeholder=""
        />
        <wd-input
          readonly
          label="目标活动数量"
          label-width="110px"
          v-model="formModel.targetNum"
          placeholder=""
        />
        <wd-input
          readonly
          label="实际活动数量"
          label-width="110px"
          v-model="formModel.actualNum"
          placeholder=""
        />
      </wd-cell-group>
    </wd-form>
  </view> -->
</template>

<script setup>
import AccessApi from '@/service/access'

const formRef = ref()
const formModel = ref({
  userId_dictText: '',
  year: '',
  quarter: '',
  targetNum: '',
  actualNum: '',
})

const detail = ref({})

const getDetail = async (id) => {
  const params = { id }
  const { code, result } = await AccessApi.getPersonAccessDetail(params)
  if (code === 200 && result) {
    // formModel.value = { ...result }
    detail.value = { ...result }
  }
}

onLoad((options) => {
  if (options.id) {
    getDetail(options.id)
  }
})
</script>

<script>
export default {
  options: {
    styleIsolation: 'shared',
  },
}
</script>

<style lang="scss">
@import '../../../style/common-form';
</style>
